import os.path


class Config:
    # session的SECRET_KEY
    SECRET_KEY = 'qiqibabawobalabala'
    # 项目路径
    BASE_DIR = os.path.dirname(os.path.abspath(__file__))
    # 静态文件夹的路径,项目路径拼接向下的文件夹
    STATIC_DIR = os.path.join(BASE_DIR, 'static')
    TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
    IMAGE_DIR = os.path.join(BASE_DIR, 'static/image')
    UPLOAD_ICON_DIR = os.path.join(BASE_DIR, 'static/image/upload/icon')
    UPLOAD_PHOTO_DIR = os.path.join(BASE_DIR, 'static/image/upload/photo')
    HOST = '127.0.0.1'
    PORT = 3306
    USER = 'root'
    PASSWORD = 'root'
    DATABASE = 'javablog'


class DevelopmentConfig(Config):
    ENV = 'development'
    DEBUG = True
